export {}
/*
  类型别名: 给一个类型起个名字
  基本语法
  - type 类型别名 = 具体类型 
  - 定义类型别名，遵循大驼峰命名规范，类似于变量
  - 使用类型别名，与类型注解的写法一样即可
  使用场景：
  - 当同一类型（复杂）被多次使用时，可以通过类型别名，简化 该类型的使用
*/

// let arr1: (string | number | boolean | undefined)[] = ['张三', 10, true, undefined]
// let arr2: (string | number | boolean | undefined)[] = ['张三', 10, true, undefined]
// let arr3: (string | number | boolean | undefined)[] = ['张三', 10, true, undefined]
// let arr4: (string | number | boolean | undefined)[] = ['张三', 10, true, undefined]
// let arr5: (string | number | boolean | undefined)[] = ['张三', 10, true, undefined]

// -----------使用类型别名优化--------------
type CustomArr = (string | number | boolean | undefined)[]

let arr1: CustomArr = ['张三', 10, true, undefined]
let arr2: CustomArr = ['张三', 10, true, undefined]
let arr3: CustomArr = ['张三', 10, true, undefined]
let arr4: CustomArr = ['张三', 10, true, undefined]
let arr5: CustomArr = ['张三', 10, true, undefined]